<?php
class Collection extends Base{

    public static $timestamps   =   true;

    public static $table        =   'collections';

    public static $accessible   =   array('name', 'amount', 'status', 'description', 'sort');

    public function products() {
      return $this->has_many_and_belongs_to('Product', 'collection_product');
    }

    public function imgs() {
      return $this->has_many('Img');
    }

    public function tags() {
      return $this->has_many('Tag');
    }

    public function groups() {
      return $this->has_many('Group');
    }
}
